package w3_1;

public class Lt6 {
	public static void main(String[] args) {
		int sum = 0;
		int i;
		for(i=1; ;i++) {
			sum += i;
			if (sum >= 8888) {
				break;
			}
		}
		System.out.println("sum = " + sum);
		System.out.println("i = " + (i-1));
	}

}
